More strikes but fewer strikers in 2022#
03/05/2023 15:00
# Load image from link
url = 'https://cdn.cbs.nl/images/6d6937674277573235627978534b49652b6e323757513d3d/900x450.jpg'
# Display image from URL with smaller size and subtitle
from IPython.display import Image, display
# Set the desired image width and height
width = 600
height = 300
# Set the subtitle text
subtitle = "© Hollandse Hoogte / Peter Hilz"
# Create an Image instance with the URL
image = Image(url=url, width=width, height=height)
# Display the image and subtitle
display(image)
print(subtitle)

© Hollandse Hoogte / Peter Hilz
In 2022, there were altogether 33 labour strikes in the Netherlands, up from 22 strikes in 2021. However, last year’s strikes involved fewer workers, which resulted in fewer working days lost: 39 thousand, against 59 thousand in 2021. Statistics Netherlands (CBS) reports this based on newly released figures.
In 2020, the year in which measures against coronavirus were introduced, there were 9 labour strikes. After this, the number increased to 33 strikes in 2022. The last time there were relatively more strikes was in 1988 (38 strikes).
import plotly.express as px
import pandas as pd
# Read the data from table1.csv
df = pd.read_csv('table1.csv')
# Create the line plot with Plotly
fig = px.line(df, x="Jaartal", y="Labour strikes", title='Labour strikes')
# Customize the plot layout
fig.update_layout(
plot_bgcolor='white',
xaxis=dict(title='Years'),
yaxis=dict(title='') # Remove y-axis tick labels
)
# Add blue small circles when hovering over a point
fig.update_traces(
mode='lines+markers',
hovertemplate='<b>%{x}</b><br>Labour strikes: <b>%{y}</b>' +
'<extra></extra>', # Use <extra></extra> to disable default hover info
line=dict(color='#00a1cd', width=2),
marker=dict(color='#00a1cd', size=5),
)
# Add horizontal lines at y = 0, 10, 20, 30, and 40
y_values = [0, 10, 20, 30, 40]
for y in y_values:
fig.add_shape(
type='line',
x0=min(df['Jaartal']),
x1=max(df['Jaartal']),
y0=y,
y1=y,
line=dict(color='black'),
line_width=0.5
)
# Show the plot
fig.show()
At 17 thousand, the number of workers on strike in 2022 was lower than in 2021 (28 thousand workers) and considerably lower than in 2020, when there were 105 thousand. As a result, fewer working days were lost in 2020 and 2021.
import plotly.graph_objects as go
import pandas as pd
# Read the data from table2.csv
df2 = pd.read_csv('table2.csv')
# Initialize a figure
fig2 = go.Figure()
# Create the first line
fig2.add_trace(
go.Scatter(
x=df2["Jaartal"],
y=df2["Workers involved (x 1,000)"],
mode='lines+markers',
line=dict(color='#00a1cd', width=2),
marker=dict(color='#00a1cd', size=5),
name="Workers involved",
hovertemplate='<b>%{x}</b><br>Workers involved: <b>%{y} thousand</b> <extra></extra>'
)
)
# Create the second line
fig2.add_trace(
go.Scatter(
x=df2["Jaartal"],
y=df2["Working days lost (x 1,000)"],
mode='lines+markers',
line=dict(color='#0058b8', width=2),
marker=dict(color='#0058b8', size=5),
name="Working days lost",
hovertemplate='<b>%{x}</b><br>Working days lost: <b>%{y} thousand</b> <extra></extra>'
)
)
# Customize the plot layout
fig2.update_layout(
plot_bgcolor='white',
xaxis=dict(title='Years'),
yaxis=dict(title=''), # Remove y-axis tick labels
legend=dict(title='', orientation='h', yanchor='bottom', y=-0.3, xanchor='right', x=0.3), # Update legend settings
title="Number of workers involved and working days lost during strikes<br><sub>x 1,000</sub>"
)
# Add horizontal lines at y = 0, 100, 200, 300, 400, and 500
y_values = [0, 100, 200, 300, 400, 500]
for y in y_values:
fig2.add_shape(
type='line',
x0=min(df2['Jaartal']),
x1=max(df2['Jaartal']),
y0=y,
y1=y,
line=dict(color='black'),
line_width=0.5
)
# Show the plot
fig2.show()
Strikes scattered throughout the year#
Most of the strikes last year (13) took place partly or entirely in the second quarter. Four took place in the third quarter.
28 out of the 33 strikes were called by a trade union. 25 strikes were ended by an agreement after negotiations involving a trade union.
Most strikers working in transportation and storage#
The sector with the highest number of strikes was transportation and storage (13 times). These also involved the highest number of strikers (7 thousand) and the strikes led to the highest loss of working days (23 thousand).
The manufacturing sector saw relatively many strikes as well (12). These resulted in 9 thousand lost working days and involved 1.5 thousand strikers.
Information and communication workers least satisfied with CLA#
In the majority of cases (20), the reason to strike was dissatisfaction with the collective labour agreement as a whole. For 8 strikes, the only reason were the wages. Workers have been asked to rate their satisfaction with their company’s collective agreement and salary as part of the Working Conditions Survey (NEA), conducted by CBS and TNO. This showed that, in 2022, 77 percent of all workers were (very) satisfied with their employer’s collective agreement. 74 percent of the employees were satisfied or very satisfied with their pay.
Workers (both 88 percent) were most likely to be (very) satisfied with the collective agreement in education and public administration. Least satisfied were workers in the information and communication sector, at 66 percent. Employees of financial institutions (88 percent) were most likely to be satisfied with their pay. Least satisified with pay were workers in the care sector (66 percent).
import plotly.graph_objects as go
import pandas as pd
# Read the data from table3.csv
df3 = pd.read_csv('table3.csv')
# Create an empty figure
fig3 = go.Figure()
# Define a list of tuples with the variable names and their respective colors
variables = [("Collective agreement (CAO) (% (very) satisfied)", '#00a1cd'),
("Salary (% (very) satisfied)", '#0058b8')]
# Loop over the variables to add a trace for each one
for var, color in variables:
name = var.split("(")[0].strip()
fig3.add_trace(go.Bar(
y=df3["Bedrijfstak"],
x=df3[var],
name=name,
orientation='h',
hovertemplate=f'%{{y}}<br>{name}: <b>%{{x}}% (very) satisfied</b><extra></extra>',
marker_color=color
))
# Customize the plot layout
fig3.update_layout(
plot_bgcolor='white',
title="Percentage of employees satisfied with collective agreement and salary<br>(15-74 yrs), 2022",
xaxis=dict(title='', title_standoff=10, automargin=True, range=[0, 100]), # Hide the original x-axis title
yaxis=dict(title='', autorange="reversed", automargin=True), # Remove y-axis title and add more whitespace between items
legend=dict(title='', orientation='h', yanchor='bottom', y=-0.3, xanchor='right', x=0.04), # Update legend settings
barmode='group', # Stack bars instead of placing them side-by-side
annotations=[dict(x=1.015, y=-0.15, xref='paper', yref='paper', showarrow=False, text="(%) very satisfied")] # Add annotation as x-axis title
)
# Show the plot
fig3.show()
Expectations for the future#
Curabitur non lacus ex. Maecenas at massa ultricies justo venenatis condimentum sed et eros. Ut vitae iaculis massa. Aenean vitae sagittis nibh. Aliquam pharetra dui suscipit purus dictum rutrum. Donec ultricies odio quis porttitor aliquet. Fusce sed nisl non velit rutrum commodo nec sed magna. Morbi non volutpat mi, cursus pulvinar dolor.
Nam sit amet volutpat sapien. Aenean eu mattis neque. Maecenas eget libero consequat, condimentum nulla luctus, fermentum lectus. Donec at enim sit amet dolor vestibulum faucibus. Vestibulum velit elit, faucibus ut mi sit amet, mollis rutrum eros. Ut ut lacinia ante, eu placerat ligula. Fusce quis convallis purus. Maecenas eget fringilla quam.
Proin ac sapien et lectus tempor dignissim a at arcu. Donec placerat aliquet odio, vel aliquam nibh tempus vel. Pellentesque non velit iaculis, porta metus sed, dictum augue. Aenean tempus gravida ullamcorper. Proin cursus fringilla turpis. Integer id lectus dignissim, ultrices metus vel, dictum quam. Suspendisse augue ligula, vestibulum ac nulla a, porta pharetra leo. Integer et pharetra lacus, in porttitor mauris. Cras sodales metus sit amet enim rhoncus sodales. Etiam orci enim, tincidunt eget arcu vel, gravida scelerisque lacus.
import plotly.graph_objects as go
import pandas as pd
import numpy as np
# Assuming you have df3 as your original DataFrame
# Create a new DataFrame for random data
df4 = df3.copy()
# Set a random seed for reproducibility
np.random.seed(42)
# Add random data for years 2022-2026
for year in range(2022, 2027):
for var, _ in variables:
df4[var + " " + str(year)] = np.random.randint(0, 100, df4.shape[0])
# Create an empty figure
fig4 = go.Figure()
# Initialize a list to hold the trace names
trace_names = []
# Loop over the variables to add a trace for each one
for var, color in variables:
for year in range(2022, 2027):
name = var.split("(")[0].strip()
trace_name = f"{name} {year}"
fig4.add_trace(go.Bar(
y=df4["Bedrijfstak"],
x=df4[var + " " + str(year)],
name=name,
orientation='h',
hovertemplate=f'%{{y}}<br>{name}: <b>%{{x}}% (very) satisfied</b><extra></extra>',
marker_color=color,
legendgroup=name, # Add a legend group for each variable
visible = year == 2022
))
trace_names.append(trace_name)
# Add slider steps
steps = []
for i, year in enumerate(range(2022, 2027)):
step = dict(
method="update",
args=[{"visible": [name.endswith(str(year)) for name in trace_names]}, # Show only the traces ending with the current year
{"title": f"Randomized percentage of employees satisfied with collective agreement and salary<br>(15-74 yrs), {year}"}],
label=str(year)
)
steps.append(step)
# Customize the plot layout
fig4.update_layout(
plot_bgcolor='white',
title="Randomized percentage of employees satisfied with collective agreement and salary<br>(15-74 yrs), 2022-2026",
xaxis=dict(title='', title_standoff=10, automargin=True, range=[0, 100]),
yaxis=dict(title='', autorange="reversed", automargin=True),
legend=dict(title='', orientation='h', yanchor='bottom', y=-0.185, xanchor='right', x=0.04),
barmode='group',
annotations=[dict(x=1.015, y=-0.15, xref='paper', yref='paper', showarrow=False, text="(%) very satisfied")],
sliders=[dict(
active=0,
pad={"t": 60}, # Increase top padding for the slider to move it further down
len=1, # Adjust the length of the slider
steps=steps,
currentvalue={"visible": False}
)]
)
# Show the plot
fig4.show()
Employee satisfaction#
Sed nec turpis sit amet erat accumsan dapibus non quis lacus. Donec euismod tellus non tellus scelerisque, congue semper leo gravida. Aliquam nulla enim, blandit vitae fringilla eget, tempor ac tellus. Pellentesque ac porttitor diam. Pellentesque sollicitudin arcu vel consectetur rutrum. Aliquam erat volutpat. Cras fermentum risus ut justo venenatis molestie. Cras dignissim nisi ut neque venenatis scelerisque.
Nulla faucibus erat ipsum, vel faucibus risus congue non. Mauris congue sem feugiat libero maximus, iaculis sodales diam sodales. Nunc ac euismod nisi. Maecenas egestas arcu sed urna accumsan, in viverra enim accumsan. Cras risus sem, convallis id malesuada vel, lacinia sit amet diam. Fusce leo nisi, malesuada ac eros in, finibus faucibus diam. Curabitur vitae dignissim nulla, sit amet vehicula arcu. Suspendisse ultrices ligula sed mauris venenatis dictum. Morbi quis purus velit.
import plotly.graph_objects as go
import pandas as pd
import numpy as np
import plotly.colors as colors
# Set a random seed for reproducibility
np.random.seed(42)
# Create a new DataFrame for random data
df5 = df3[df3['Bedrijfstak'].isin(df3['Bedrijfstak'].unique()[:5])].copy()
# Define new variables and add random data for each one
new_variables = ["Work-life balance", "Job security", "Company culture"]
for var in new_variables:
df5[var] = np.random.randint(6, 100, df5.shape[0]) # generate random integers from 6 to 100
# Initialize an empty figure
fig5 = go.Figure()
# Add a pie chart for each variable
for var in new_variables:
fig5.add_trace(go.Pie(
labels=df5["Bedrijfstak"],
values=df5[var],
name=var,
hovertemplate=f'{var}: <b>%{{value}}% (very) satisfied</b><extra></extra>',
))
# Only display the first pie chart initially
for i in range(1, len(fig5.data)):
fig5.data[i].visible = False
# Create a dropdown menu
dropdown = [{"label": var, "method": "update",
"args": [{"visible": [j == i for j in range(len(new_variables))]},
{"title": f"Employee satisfaction with {var}"}]}
for i, var in enumerate(new_variables)]
# Define a custom color scale
custom_colorscale = [
'#2241D5',
'#447ADE',
'#66ABE6',
'#88D2ED',
'#AAEEF3'
]
# Customize the plot layout
fig5.update_layout(
updatemenus=[
go.layout.Updatemenu(
buttons=dropdown,
direction="down",
showactive=True,
x=0.01, # move the dropdown menu to the left
xanchor="left", # anchor the dropdown menu to the left
y=1.0, # move the dropdown menu higher
),
],
title="Employee satisfaction with Work-life balance",
title_x=0.05, # move the title to the left
legend=dict(title='', orientation='v', yanchor='top', y=0.3, xanchor='left', x=0), # move the legend to the left
colorway=custom_colorscale, # set the blue color scale
height=500, # set the height of the plot
margin=dict(l=50, r=50, t=100, b=50), # adjust the margins for proper spacing
xaxis=dict(domain=[0, 0.45]), # adjust the x-axis position
yaxis=dict(domain=[0.2, 1.0]) # adjust the y-axis position
)
# Show the plot
fig5.show()
Average income#
Nam laoreet sit amet lacus sit amet aliquet. Donec ac tellus id nisl imperdiet pellentesque at ut lectus. Integer tempus et erat a aliquet. Morbi aliquet sodales dapibus. Vivamus condimentum ac sem in efficitur. Nulla et iaculis eros, eget vestibulum libero. Curabitur in purus eros. Mauris facilisis, erat vel euismod maximus, nibh dui fermentum enim, at finibus nisl elit vel tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Aenean quis lorem sit amet enim commodo maximus quis eu magna. Fusce vel elit quis enim consectetur vehicula. Sed elementum est ligula, eu eleifend odio aliquet et. Etiam lacinia tempor eros, facilisis pharetra ipsum finibus gravida. Fusce quis sem elementum, pharetra neque eu, consectetur odio. Maecenas pretium arcu vitae feugiat venenatis. Nam nec mollis orci. Proin pellentesque libero a sem convallis, et egestas diam accumsan. Maecenas malesuada lacus et sapien venenatis, sed ullamcorper enim facilisis. Aenean ut posuere metus. Etiam aliquam convallis nulla, ut pellentesque tellus ornare et. Suspendisse eu bibendum mi. Suspendisse ac sapien iaculis, consectetur ante et, eleifend ex. Morbi pellentesque ligula ipsum, mattis pellentesque libero auctor ut. Proin vulputate purus orci, id consectetur tellus lacinia ut.
Vivamus cursus placerat neque, sed mattis ante. Sed aliquet velit risus. Pellentesque ac porta velit. Nunc in rhoncus risus. Maecenas gravida justo diam, a pretium nibh iaculis pharetra. Curabitur lacus velit, commodo a tortor a, viverra rhoncus nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sed sodales neque. Nullam iaculis magna ligula, eget ornare diam dignissim quis. Duis ac sollicitudin magna. Proin id hendrerit velit. Suspendisse potenti.
import geopandas as gpd
import pandas as pd
import plotly.express as px
import random
# Read the shapefile using geopandas
shapefile_path = 'gadm41_NLD_shp/gadm41_NLD_1.shp'
data = gpd.read_file(shapefile_path)
# Sample data for demonstration
sample_data = {
'Province': ['Drenthe', 'Flevoland', 'Fryslân', 'Gelderland', 'Groningen', 'Limburg', 'Noord-Brabant', 'Noord-Holland', 'Overijssel', 'Utrecht', 'Zeeland', 'NA'],
'average_income': [random.randint(0, 1000000) for _ in range(12)]
}
# Merge the sample data with the shapefile data
merged_data = data.merge(pd.DataFrame(sample_data), left_on='NAME_1', right_on='Province')
# Exclude Zeeuwse meren and IJsselmeer regions
merged_data = merged_data[~merged_data['NAME_1'].isin(['Zeeuwse meren', 'IJsselmeer'])]
# Rename Fryslân to Friesland
merged_data.loc[merged_data['NAME_1'] == 'Fryslân', 'NAME_1'] = 'Friesland'
# Rename Noord-Brabant to Brabant
merged_data.loc[merged_data['NAME_1'] == 'Noord-Brabant', 'NAME_1'] = 'Brabant'
# Rename NA to Zuid-Holland
merged_data.loc[merged_data['NAME_1'] == 'NA', 'NAME_1'] = 'Zuid-Holland'
# Create the choropleth map using Plotly Express
fig6 = px.choropleth_mapbox(
merged_data,
geojson=merged_data.geometry.__geo_interface__,
color='average_income',
locations=merged_data.index,
featureidkey="id",
center={"lat": 52.1326, "lon": 5.2913},
mapbox_style="carto-positron",
zoom=5.5,
color_continuous_scale='Blues',
labels={'average_income': 'Average income'},
opacity=0.75,
hover_name='NAME_1', # Update to 'NAME_1' for correct hover labels
hover_data={'average_income': True, 'NAME_1': False}, # Update to 'NAME_1' for correct hover data
custom_data=['average_income'],
)
fig6.update_traces(
hovertemplate='<b>%{hovertext}</b><br>Average income: <b>%{customdata[0]}k</b><extra></extra>',
)
fig6.update_layout(
title_text='Average income by Province in the Netherlands',
margin={"r": 30, "t": 70, "l": 30, "b": 30},
legend=dict(
traceorder='normal',
font=dict(size=10),
bgcolor='rgba(255, 255, 255, 0.5)',
bordercolor='rgba(0, 0, 0, 0.5)',
borderwidth=0.5
),
hoverlabel=dict(
bgcolor='white',
font_size=12,
font_family='Arial',
),
)
fig6.show()
References#
CBS (2023, May 3). More strikes but fewer strikers in 2022. Statistics Netherlands. https://www.cbs.nl/en-gb/news/2023/18/more-strikes-but-fewer-strikers-in-2022